package com.glela.platform.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.glela.platform.mapper.CGuestMapper;
import com.glela.platform.model.Guest;
import com.glela.platform.service.IGuestService;

@Service
public class GuestService implements IGuestService {

	@Autowired
	CGuestMapper guestMapper;
	
	@Override
	public Guest selectByCode(String code) {
		return guestMapper.selectByCode(code);
	}

	@Override
	public int updateInfo(Guest guest) {
		return guestMapper.update(guest);
	}

	@Override
	public int saveDeviceActiveLog(String guestId, long userId, String located,
			String ip, String channel) {
		return guestMapper.insertActiveLog(guestId,userId,located,ip,channel);
	}

}
